﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

class Person
{
    public string name;
    public int age;
    public string address;
    public double salary;
    public bool isMarried;
    public string phone;
    
    public void PrintMessage()
    {
        Console.WriteLine($"姓名: {name}");
        Console.WriteLine($"年龄: {age}");
        Console.WriteLine($"家庭住址: {address}");
        Console.WriteLine($"工资: {salary}");
        Console.WriteLine($"婚否: {(isMarried ? "是" : "否")}");
        Console.WriteLine($"手机号: {phone}");
    }

    public void PrintMessage1()
    {
        Console.WriteLine($"姓名\t年龄\t家庭住址\t\t工资\t婚否\t手机号");
        Console.WriteLine($"{name}\t{age}\t{address}\t{salary}\t{(isMarried ? "是" : "否")}\t{phone}");
    }
}


namespace 字符串练习
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Person person = new Person();
            person.name = "光头强";
            person.age = 32;
            person.address = "北京市光头区光头村";
            person.salary = 5000.5;
            person.isMarried = false;
            person.phone = "13777777777";

            //person.PrintMessage();
            person.PrintMessage1();
            
        }
    }
}
